package org.dreamwork.seagragon;

import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;

/**
 * Created by IntelliJ IDEA.
 * User: seth
 * Date: 2010-4-23
 * Time: 16:47:20
 */
public class ReadOnlyEnumeration implements Enumeration {
    private Iterator iter;

    public ReadOnlyEnumeration (Collection c) {
        this.iter = c.iterator ();
    }

    public ReadOnlyEnumeration (Iterator iter) {
        this.iter = iter;
    }

    public boolean hasMoreElements () {
        return iter.hasNext ();
    }

    public Object nextElement () {
        return iter.next ();
    }
}